<?php
namespace app\common\service\fulu;
use app\common\service\BaseService;

/**
 * Class Common
 * 定义公共参数
 */
class Common extends BaseService
{
    // 福禄网络-AppKey
    const FU_LU_APP_KEY = 'i4esv1l+76l/7NQCL3QudG90Fq+YgVfFGJAWgT+7qO1Bm9o/adG/1iwO2qXsAXNB';
    // 福禄网络-AppSecret
    const FU_LU_APP_SECRET = '0a091b3aa4324435aab703142518a8f7';
    // 福禄网络-MemberCode
    const FU_LU_MEMBER_CODE = '9000358';
    // 测试/生产环境IP：47.110.196.112、118.31.170.160
    const FU_LU_URL = 'http://pre.openapi.fulu.com/api/getway';

    // 福禄网路-错误码-自定义错误码替换福禄平台状态吗
    const FU_LU_RET_DIC = [
        0    => ['code' => 0, 'msg' => '接口调用成功',],
        1000 => ['code' => 100071000, 'msg' => '必须传入API接口名称',],
        1001 => ['code' => 100071001, 'msg' => '无效的API接口名称',],
        1002 => ['code' => 100071002, 'msg' => '必须传入时间戳',],
        1003 => ['code' => 100071003, 'msg' => '时间戳格式错误',],
        1004 => ['code' => 100071004, 'msg' => '时间戳已超过有效期',],
        1005 => ['code' => 100071005, 'msg' => '必须传入app_key',],
        1006 => ['code' => 100071006, 'msg' => '无效的app_key',],
        1007 => ['code' => 100071007, 'msg' => '必须传入版本号',],
        1008 => ['code' => 100071008, 'msg' => '版本号错误',],
        1009 => ['code' => 100071009, 'msg' => '必须传入format格式',],
        1010 => ['code' => 100071010, 'msg' => 'format格式错误',],
        1011 => ['code' => 100071011, 'msg' => '必须传入编码格式',],
        1012 => ['code' => 100071012, 'msg' => '编码格式错误',],
        1013 => ['code' => 100071013, 'msg' => '必须传入签名加密类型',],
        1014 => ['code' => 100071014, 'msg' => '签名加密类型错误',],
        1015 => ['code' => 100071015, 'msg' => '必须传入签名',],
        1016 => ['code' => 100071016, 'msg' => '签名错误',],
        1017 => ['code' => 100071017, 'msg' => '必须传入请求参数集合',],
        1018 => ['code' => 100071018, 'msg' => '缺少必要参数',],
        1019 => ['code' => 100071019, 'msg' => '访问IP不在IP白名单内',],
        2000 => ['code' => 100072000, 'msg' => '商户不存在',],
        2001 => ['code' => 100072001, 'msg' => '商户已被禁用',],
        2002 => ['code' => 100072002, 'msg' => '无效的商户或应用',],
        2003 => ['code' => 100072003, 'msg' => '商户或应用配置异常',],
        2004 => ['code' => 100072004, 'msg' => '商户余额不足',],
        2114 => ['code' => 100072114, 'msg' => '必须传入对账单获取单号',],
        2115 => ['code' => 100072115, 'msg' => '必须传入对账单主题',],
        2116 => ['code' => 100072116, 'msg' => '对账单主题格式错误',],
        2117 => ['code' => 100072117, 'msg' => '必须传入账单类型',],
        2118 => ['code' => 100072118, 'msg' => '账单类型错误',],
        2119 => ['code' => 100072119, 'msg' => '对账单excel列头错误',],
        2120 => ['code' => 100072120, 'msg' => '必须传入开始时间和结束时间',],
        2121 => ['code' => 100072121, 'msg' => '开始时间或结束时间错误',],
        3000 => ['code' => 100073000, 'msg' => '必须传入商品编号',],
        3001 => ['code' => 100073001, 'msg' => '商品不存在或无法购买',],
        3002 => ['code' => 100073002, 'msg' => '商品已下架',],
        3003 => ['code' => 100073003, 'msg' => '商品维护中',],
        3004 => ['code' => 100073004, 'msg' => '商品在维护期内',],
        3005 => ['code' => 100073005, 'msg' => '商品库存不足',],
        3006 => ['code' => 100073006, 'msg' => '必须传入商品模板编号',],
        3007 => ['code' => 100073007, 'msg' => '商品模板不存在',],
        3008 => ['code' => 100073008, 'msg' => '商品类型错误',],
        3009 => ['code' => 100073009, 'msg' => '商品异常，商品库存状态无法查询',],
        4000 => ['code' => 100074000, 'msg' => '必须传入外部订单号',],
        4001 => ['code' => 100074001, 'msg' => '购买数量必须大于0',],
        4002 => ['code' => 100074002, 'msg' => '必须传入充值账号',],
        4003 => ['code' => 100074003, 'msg' => '充值账号不是手机号',],
        4004 => ['code' => 100074004, 'msg' => '充值账号在黑名单中',],
        4005 => ['code' => 100074005, 'msg' => '充值面值(数额)必须大于0',],
        4008 => ['code' => 100074008, 'msg' => '添加订单失败',],
        4009 => ['code' => 100074009, 'msg' => '执行下单超时，请查单确认下单结果',],
        4010 => ['code' => 100074010, 'msg' => '外部订单号已存在',],
        4011 => ['code' => 100074011, 'msg' => '订单不存在',],
        4012 => ['code' => 100074012, 'msg' => '查询异常，请重试',],
        5000 => ['code' => 100075000, 'msg' => '系统异常，订单可疑',],
        5001 => ['code' => 100075001, 'msg' => '系统异常',],
    ];

    // 福禄网路-API接口地址
    const FU_LU_REQUEST_URI = [
        101 => 'fulu.user.info.get', //获取用户信息接口
        201 => 'fulu.goods.list.get', //获取商品列表接口
        202 => 'fulu.goods.info.get', //获取商品信息接口
        203 => 'fulu.goods.template.get', //获取商品模板接口
        204 => 'fulu.goods.stock.check', //商品库存校验接口
        301 => 'fulu.order.direct.add', //直充下单接口
        302 => 'fulu.order.card.add', //卡密下单接口
        303 => 'fulu.order.mobile.add', //话费下单接口
        304 => 'fulu.order.info.get', //订单查询接口
        305 => 'fulu.order.extend.get', //订单扩展信息查询接口
        306 => 'fulu.order.record.get', //对账单申请接口
        401 => 'fulu.alipay.applet.pay', //支付宝小程序支付接口
        402 => 'fulu.alipay.app.pay', //支付宝App支付接口
        403 => 'fulu.alipay.h5.pay', //支付宝H5支付接口
        404 => 'fulu.alipay.h5.query', //支付宝查单接口
        405 => 'fulu.alipay.h5.refund', //支付宝退款接口
        406 => 'fulu.alipay.refund.query', //支付宝退款查询接口
        411 => 'fulu.wechatpay.applet.pay', //微信小程序支付接口
        412 => 'fulu.wechatpay.h5.pay', //微信H5支付接口
        413 => 'fulu.wechatpay.h5.query', //微信查单接口
        414 => 'fulu.wechatpay.h5.refund', //微信退款接口
        415 => 'fulu.wechatpay.refund.query', //微信退款查询接口
        501 => 'fulu.market.qqnickname.get', //QQ昵称查询接口
        502 => 'fulu.aiqiyi.user.check', //爱奇艺用户身份校验接口
        503 => 'fulu.mobile.maintain.check', //话费维护状态检查接口
        504 => 'fulu.mobile.info.get', //手机号归属地接口
    ];
}

?>